package com.hlbbcsr.business.impl;

import java.util.Date;
import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.hlbbcsr.business.ContractManager;
import com.hlbbcsr.domain.bean.Contract;

@Service("contractManager")
@Transactional(value = "transactionManager", propagation = Propagation.REQUIRED)
public class ContractManagerImpl extends BaseManager implements ContractManager{

	@Override
	public List<Contract> listContract() throws Exception {
		return getcontractDAO().listContract();
	}

	@Override
	public void addContract(Contract contract) throws Exception {
		if(contract != null){
			//Call DAO to insert Database
			  
			getcontractDAO().addContract(contract);
		} 
	}

	@Override
	public List<Contract> searchEngine(Contract contract) throws Exception {
		return getcontractDAO().searchEngine(contract); 
	}

}
